package com.fundynamic.coderetreat;

/**
 * Created by IntelliJ IDEA.
 * User: shendriks
 * Date: 7-1-12
 * Time: 12:18
 * To change this template use File | Settings | File Templates.
 */
public class Cell {

	private long x, y;

	public Cell(int x, int y) {
	this.x = x;
		this.y = y;
	}

	public boolean isAlive() {
		return true;
	}

	public boolean isAdjecent(Cell adjecent) {
		long diffX = Math.abs(adjecent.getX() - x);
		long diffY = Math.abs(adjecent.getY() - y);
		return diffX == 1 || diffY == 1;
	}

	public long getX() {
		return x;
	}

	public long getY() {
		return y;
	}
}
